import React from 'react'
import { Layout, Menu } from 'antd';
import { Link } from 'react-router-dom'
import { UserOutlined, ApiOutlined, DatabaseOutlined, TableOutlined, HistoryOutlined } from '@ant-design/icons';
import HomeContent from './Content';
const { SubMenu } = Menu;
const { Sider } = Layout;


const Sidebar: React.FC = (props: any) => {
    return (
        <Layout className="home-sidebar">
            <Sider width={200} >
                <Menu
                    mode="inline"
                    style={{ height: '100%', borderRight: 0 }}
                >
                    <SubMenu key="sub1" icon={<UserOutlined />} title="Dashboard">
                        <Menu.Item key="11">
                            <Link to='/home'>接口概要</Link>
                        </Menu.Item>
                        <Menu.Item key="12">
                            <Link to='/home/analysis'>分析页</Link>
                        </Menu.Item>
                        <Menu.Item key="13">
                            <Link to='/home/workplace'>工作台</Link>
                        </Menu.Item>
                        {/* workplace */}
                    </SubMenu>
                    <SubMenu key="sub2" icon={<TableOutlined />} title="数据表管理">
                        <Menu.Item key="21">
                            <Link to='/home/table/index'>数据表列表</Link>
                        </Menu.Item>
                    </SubMenu>
                    <SubMenu key="sub3" icon={<ApiOutlined />} title="接口管理">
                        <Menu.Item key="31">
                            <Link to='/home/api/category'>接口分类</Link>
                        </Menu.Item>
                        {/* <Menu.Item key="32">
                            <Link to='/home/api/index'>接口列表</Link>
                        </Menu.Item> */}
                    </SubMenu>
                    <SubMenu key="sub4" icon={<DatabaseOutlined />} title="数据管理">
                        <Menu.Item key="41">
                            <Link to='/home/data/index'>数据列表</Link>
                        </Menu.Item>
                    </SubMenu>
                    <SubMenu key="sub5" icon={<HistoryOutlined />} title="归档">
                        <Menu.Item key="51">
                            <Link to='/home/archive/table'>数据表</Link>
                        </Menu.Item>
                        <Menu.Item key="52">
                            <Link to='/home/archive/api/category'>接口分类</Link>
                        </Menu.Item>
                        <Menu.Item key="53">
                            <Link to='/home/archive/api'>接口</Link>
                        </Menu.Item>
                        <Menu.Item key="54">
                            <Link to='/home/archive/data'>数据</Link>
                        </Menu.Item>
                    </SubMenu>
                </Menu>
            </Sider>
            <HomeContent />
        </Layout>
    )
}


export default Sidebar;
